import React from 'react'
import ReactDOM from 'react-dom/client'
import AppRouter from './router'
import './index.scss'
import 'antd/dist/reset.css'

// 只在开发环境中引入mock数据
if (import.meta.env.DEV) {
  import('./mock/index').then(() => {
    console.log('Mock数据已加载');
  }).catch((error) => {
    console.error('Mock数据加载失败:', error);
  });
}

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <AppRouter />
  </React.StrictMode>,
)
